<%@ page pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
	<title>文章编辑</title>
	<%@include file="/common/jsp/taglib.jsp"%>
	<script type="text/javascript" charset="utf-8" src="${ctx }common/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="${ctx }common/ueditor/ueditor.all.min.js"> </script>
    <link rel="stylesheet" type="text/css" href="${ctx }common/system/assets/bootstrap-fileupload/bootstrap-fileupload.css" />
    <script type="text/javascript" src="${ctx }common/system/assets/bootstrap-fileupload/bootstrap-fileupload.js"></script>
	<script type="text/javascript" src="${ctx }common/system/assets/fuelux/js/spinner.min.js"></script>
	
  
  
	<script type="text/javascript" >
	
	$(function(){
		common.refreshSelect('type','code2nameOfProperties','article_type');
		
		$('#spinner4').spinner({value:1, step: 1, min: 1, max: 200});
	});
	function submitform(){
		var d = $("#articleform").serialize();
		var url = ctx + "article/saveArticle.do";
		//console.info(d);  editorValue  ueditor的内容 
		common.submitForm2Path('articleform',url);
		return ;
		
	}
	
	
	</script>
    
</head>
<body>
				<!-- 主体内容开始 -->
				<div class="row">
					<div class="col-lg-12">
						<section class="panel">
 							<header class="panel-heading">
 								<span class="label label-success label-mini"><b>新增文章</b></span>
 							</header> 
							<div class="panel-body">
								<form class="form-horizontal tasi-form" role="form" id="articleform" >
									<div class="form-group"> 
                                          <label class="col-sm-2 col-sm-2 control-label"><b>标题</b></label>
                                          <div class="col-sm-10">
                                              <input type="text" id="head" name="head" class="form-control" > 
                                          </div>
                                    </div>
                                    <div class="form-group"> 
                                          <label class="col-sm-2 col-sm-2 control-label"><b>副标题</b></label>
                                          <div class="col-sm-10">
                                              <input type="text" id="subhead" name="subhead" class="form-control" > 
                                          </div>
                                    </div>
                                    
                                    <div class="form-group"> 
                                          <label class="col-sm-2 col-sm-2 control-label"><b>文章类别</b></label>
                                          <div class="col-sm-10">
                                              <select type="text" id="type" name="type"class="form-control" >
                                              </select> 
                                          </div>
                                    </div>
                                    
                                    <div class="form-group"> 
                                          <label class="col-sm-2 col-sm-2 control-label"><b>起始文字</b></label>
                                          <div class="col-sm-10">
                                              <input type="text" id="startText" name="startText"  class="form-control" maxlength="50" > 
                                          </div>
                                    </div>
                                    
                                    <div class="form-group">
										<label class="col-sm-2 col-sm-2 control-label"><b>菜单序号</b></label>
										<div class="col-sm-10">
											<div id="spinner4"> 
											
											
												<div style="width:150px;" class="input-group">
                                                      <div class="spinner-buttons input-group-btn">
                                                          <button class="btn spinner-up btn-warning" type="button">
                                                              <i class="icon-plus"></i>
                                                          </button>
                                                      </div>
                                                      <input type="text" id="position" name="position" readonly="" maxlength="3" value="${entity.position }" class="spinner-input form-control">
                                                      <div class="spinner-buttons input-group-btn">
                                                          <button class="btn spinner-down btn-danger" type="button">
                                                              <i class="icon-minus"></i>
                                                          </button>
                                                      </div>
                                                  </div>
											
                                               
                                               
                                               
                                            </div>
										</div>
									</div>
									
									
                                    <div class="form-group">
										<label class="col-sm-2 col-sm-2 control-label"><b>内容</b></label>
										<div class="col-sm-10">
											<script id="editor_content" type="text/plain" style="width:100%;height:400px;">
											</script>
										</div>
									</div>
									<div class="form-group text-center">
										<input type="hidden" id="id" name="id" value="0"/>
										<input type="hidden" name="statement" value="${statement }"  />
										<input type="hidden" name="tourl" value="${tourl }"  />
										<button type="button" class="btn btn-info" onclick="submitform();"><i class="icon-ok"></i><b>&nbsp;提 交</b></button> 
										<button type="button" class="btn btn-info" onclick="common.backToList();"><i class="icon-reply"></i><b>&nbsp;返 回</b></button> 
									</div>
								</form>
							</div>
						</section>
					</div>
				</div>
				<!-- 主体内容结束 -->
				
<script type="text/javascript">

   var ue = UE.getEditor('editor_content');
	   
  
   
</script>
    
    
</body>
</html>